package cn.tedu.bece.admin.system.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.util.List;

@Data
public class SysUserAddParam {

    @NotEmpty(message = "用户账号不能为空")
    @ApiModelProperty(value = "用户账号", required = true)
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("用户昵称")
    private String nickname;

    @Email(message = "用户邮箱格式错误")
    @ApiModelProperty("用户邮箱")
    private String email;

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式错误")
    @ApiModelProperty("手机号码")
    private String phone;

    @ApiModelProperty("性别（0男，1女，2未知）")
    private Integer sex;

    @ApiModelProperty("头像地址")
    private String avatar;

    @ApiModelProperty("状态（0正常，1停用）")
    private Integer status;

    @ApiModelProperty("角色id列表")
    private List<Long> roleIds;

}
